# Maintainer: Leonidas Spyropoulos <artafinde at archlinux dot org>

pkgname=vulture
pkgver=2.10
pkgrel=1
pkgdesc="Finds dead code in Python projects"
arch=('any')
url="https://github.com/jendrikseipp/vulture"
license=('MIT')
depends=(python-coverage python-setuptools python-pint python-toml)
makedepends=(python-build python-installer python-poetry-core python-wheel)
checkdepends=('python-tox>=4.5.1.1' python-pytest)
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('a971e6215c61cb768bfaa7a14961c2b47b77fe63a01c0399a6d6b6ba8dfed414')
b2sums=('2a12938650ed6e1e78e543c9c2450a461e5b05005c9f01cc65e4d413565a757df84420d9c9b86632823ed67b20f304bb33e3f4cf72937610478e96bc38d80f1d')

build() {
  cd "${pkgname}"-"${pkgver}"
  python -m build --wheel --no-isolation
}

check() {
  cd "${pkgname}"-"${pkgver}"
  python -m tox -e py
}

package() {
  cd "${pkgname}"-"${pkgver}"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et:
